package com.xishu.entity.area;

import com.xishu.annotation.dao.DefaultValue;
import com.xishu.entity.AbstractEntity;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Entity;

/**
 * 地区
 */
@Entity(name = "area")
public class Area extends AbstractEntity {
    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "中文名称")
    private String name_zh;

    @ApiModelProperty(value = "英文名称")
    private String name_en;

    @ApiModelProperty(value = "父ID，也就是可以通过父ID查询下一级所的地址")
    @DefaultValue(defaultValue = "0")
    private Long parentId;

    @ApiModelProperty(value = "地区的级别，省1，市2，县3")
    private Integer level;

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public String getName_zh() {
        return name_zh;
    }

    public void setName_zh(String name_zh) {
        this.name_zh = name_zh;
    }

    public String getName_en() {
        return name_en;
    }

    public void setName_en(String name_en) {
        this.name_en = name_en;
    }
}